1) Field of the Invention
The present invention relates to a bar code reading method and a bar code reading device that are employed for POS systems used in the distribution industry.
2) Description of the Related Arts
FIG. 9 is a block diagram showing a structure of a bar code reader. Referring to FIG. 9, numeral 1 represents a bar code printed on a surface of an article. The bar code 1 is formed generally of plural black bars and plural white bars alternately arranged and indicates a piece of predetermined data based on the widths of each black bar and each white bar.
An optical system 2 irradiates a laser beam to the bar code 1 and then receives the light reflected back from the bar code 1. The optical system 2 is formed of a laser emitting unit 3, a scanning mechanism 4, and a photoelectric converting unit 5. The laser emitting unit 3 includes a semiconductor laser for emitting a laser beam L1.
The scanning mechanism 4 is formed, for example, of a polygon mirror driven rotatably by a motor. The scanning mechanism 4 reflects the laser beam L1 from the laser emitting unit 3 and irradiates a laser beam L2 onto the black bars and white bars forming the bar code 1. The scanning mechanism 4 moves at a fixed rate while it scans the laser beam perpendicularly to the black bars and the white bars.
The scanning mechanism 4 reflects as a reflection light R1 the L2 from the bar code 1, and irradiates it as a reflection light R2 to the photoelectric converting unit 5.
The photoelectric converting unit 5 is formed, for example, of a photoelectric converting element such as a photo diode, and converts the reflection light R2 (optical input signal) received via the scanning mechanism 4 into an electric signal (analog value) corresponding to the light amount thereof, and outputs the electric signal.
Referring to FIG. 9, an A/D converter 6 converts an electric signal outputted from the photoelectric converting unit 5 to a signal in a digital form. The A/D converter 6 converts an electric signal from the photoelectric converting unit 5 to a binary signal in a digital form which includes a black level signal corresponding to each black bar portion in the bar code 1 and a white level signal corresponding to each white bar portion in the bar code 1. As for the binary signal, since the light amount of the light R2 reflected back from each white bar portion is usually larger than that from each black bar portion, the white level signal is obtained as a high level signal while the black level signal is obtained as a low level signal.
A bar width counter 7 counts clock signals from the clock generator 8. The bar width counter 7 outputs, as a clock signal counting value the time width of the black level signal portion and white level signal portion of a binary signal from the AID converter 6, or the values corresponding to each black bar width and each white bar width of an actual bar code 1.
Furthermore, a memory 9 stores a counted value corresponding to a bar width from the bar width counter 7, and numeral 10 represents a CPU. The CPU 10 extracts and demodulates predetermined data of the bar code 1 based on the counted value (a value corresponding to each black bar width or a value corresponding to each white bar width) stored in the memory 9.
In the above structure, the scanning mechanism 4 irradiates the laser beam L1 from the laser emitting unit 3 as a laser beam L2 to the black bars and white bars of the bar code 1. The scanning mechanism 4 is travels at a fixed rate while it scans perpendicularly to the black bars and the white bars of the bar code 1.
The laser beam L2 irradiated from the scanning mechanism 4 is scattered and reflected on a portion of the bar code 1 and reentered as a reflection light R1 to the scanning mechanism 4. The reflection light R1 travels while the reflection angle varies with the scanning movement of the laser beam L2. The reflection light R1 enters as a reflection light R2 the photoelectric converting element of the photoelectric converting unit 5 arranged at a predetermined position since it is reflected by the polygon mirror forming the scanning mechanism 4.
The photoelectric converting unit 5 converts the reflection light R2 into an electric signal corresponding to the light amount. The A/D converter 6 converts the electric signal into a digital signal or a binary signal having a black level signal corresponding to each black bar portion of the bar code 1 and a white level signal corresponding to each white bar portion of the bar code 1.
Then the bar width counter 7 counts the clock signals from the clock generator 8. The time widths of the black level signal portion and the white level signal portion of the binary signal from the A/D converter 6 (or values corresponding to each black bar width and each white bar width of an actual bar code 1) is measured as a counted value of a clock signal. The counted value is stored once in the memory 9. The CPU 10 subjects the bar width counted value stored in the memory 9 to a predetermined demodulating process to extract and demodulate a predetermined data of the bar code 1.
As described in FIG. 9, the bar code 1, as shown in FIG. 10, has plural black bars 1B and white bars 1W arranged alternatively one another. A predetermined data is represented based on the width of each black bar 1B and the width of each white bar 1W. The black bar 1B and the white bar 1W are arranged by counting a predetermined criterion length as one module having a width which is a natural number multiplied by (for example, 1 to 4 being a module number) the one module.
In concrete form, as shown in FIG. 10, the bar code 1 includes the guide bar GB arranged on the left side and the special center bar SCB arranged on the right side. The guide bar GB is formed of two black bars 1B and the one white bar 1W arranged between the black bars 1B, and the special center bar SCB is formed of three black bars 1B and three white bars 1W arranged between the black bars. The black bar 1B and the white bar 1W have a module number of one, respectively.
The guide bar GB and the special center bar SCB are arranged to define both ends of the bar code 1. For example, the character portions 1CHR to 6CHR (shown as time widths C1 to C6 in FIG. 10) indicating six numerical data are arranged between the guide bar GB and the special center bar SCB.
Each of the character portions 1CHR to 6CHR is formed of two white bars 1W and two black bars 1B, and has a total module number of 7. In each of the character portions 1CHR to 6CHR, a predetermined numerical data is represented by combining the module number (corresponding to the time width T01) from left end of the left black bar 1B to the left end of the right black bar 1B with the module number (corresponding to the time width T02) from right end of the left black bar 1B to right end of the right black bar 1B.
The relationship between the combination of the two module numbers and predetermined numerical data, well known, are stored and held previously as a table (matrix) shown in FIG. 13. In FIG. 13, the letter E represents that the total module number of the black bars 1B is an even number and the letter O represents that the total module number of the black bars 1B is an odd numbers. For example, according to the UPC bar code structure shown in FIG. 10, the character portion 1CHR represents a numerical data of "ODD0(D0)(00)", the character portion 2CHR represents a numerical data of "ODD0(D0)(01)", and the character portion 6CHR represents a numerical data of "ODD2(D2)(02)".
Hence in order to extract and demodulate data of the bar code 1, the CPU 10 determines the module number of time widths (.delta. distance lengths) T01 and T02 for every character portion 1CHR to 6CHR in accordance with a bar width counted value stored in the memory 9, and reads the numerical data corresponding to the two combined module numbers stored previously in a predetermined table.
Conventionally, in order to execute the data extraction and the demodulation process of the bar code 1, the CPU 10 checks a bar width and judges whether the bar width counted value (or the time widths C1 to C6) of the bar code 1 read is within an allowable error range or not, and then executes a character demodulating process.
The scanning mechanism 4 irradiates a laser beam L2 of 1500 cycle/sec onto the bar code 1. Scanning the laser beam once across the bar code 1 can complete a demodulating process. However, conventionally, a so-called double coincidence checking method has been performed. According to this method, in order to prevent the bar code 1 from being read erroneously, after the demodulating process has been completed, the same process is repeated again. The reading operation is completed only when it is recognized that the same data as the previous one has been demodulated
The above mentioned bar width checking, the character demodulating processing, and the double coincidence checking will be explained below in detail with reference to FIGS. 11 and 12. The CPU 10 performs a bar width checking, as shown in FIG. 11, when the bar width counted values of each black bar 1B and each white bar 1W are obtained by scanning the laser beam L2 once over the bar code (step 1).
The bar width checking obtains the time widths C1 to C6 of the character portions CHR1 to CHR 6, shown in FIG. 10, according to the bar width count value stored in the memory 9, and judges on whether the time widths C1 to C6 satisfy the following expressions (1) to (7) or not. The operational step can be advanced to the character demodulating process (step S2) only when all the conditions shown by the expressions (1) to (7) are satisfied. Even if any expressions (1) to (7) are not satisfied (NO), the next data processing (step S7) follows without performing the character demodulating process based on the bar width counted value currently obtained. EQU T1.multidot.4.025.gtoreq.C1.gtoreq.T1.multidot.2.975 (1) EQU C1.multidot.1.15.gtoreq.C2.gtoreq.C1.multidot.0.085 (2) EQU C2.multidot.1.15.gtoreq.C3.gtoreq.C2.multidot.0.85 (3) EQU C3.multidot.1.15.gtoreq.C4.gtoreq.C2.multidot.0.85 (4) EQU C4.multidot.1.15.gtoreq.C5.gtoreq.C4.multidot.0.85 (5) EQU C5.multidot.1.15.gtoreq.C6.gtoreq.C5.multidot.0.85 (6) EQU T26.multidot.4.025.gtoreq.C6.gtoreq.T26.multidot.2.975 (7)
The time widths T1 and T26, shown in FIG. 10, are subjected to a bar width checking by another checking means before the bar checking shown in step S1 is performed. According to the expressions (1) and (7), it is checked whether the time widths C1 and C6 are within a predetermined range or not by using the time widths T1 and T26. According to the expressions (2) to (6), it is checked whether the ratios (character lengths) between the time widths C1 to C6 of adjacent character portions CHR1 to CHR6, or C2/C1, C3/C2, C4/C3,/C5/C4, and C6/C5, are within a range of 0.85 to 1.15 (or within an error range of .+-.15% ) or not. Unless all conditions are satisfied, it is judged that the reading error of the bar code 1 is large. Hence according to the step S7, the following scanning data (or bar width counted value) is processed without performing the character demodulating process.
In the character demodulating process in the step S2, two numerical data determining time widths (.delta. distance values) T01 and T02 are calculated every character portion (1CHR to 6CHR) based on the bar width counted value stored in the memory 9. Then, according to the procedure shown in FIG. 12, it is judged which module numbers of 2 to 5 correspond respectively to the two time widths T01 and T02. The two module numbers obtained through the judgment are identified with the previously stored table to read the numerical data corresponding to a combination of two module numbers, whereby each of the character portions 1CHR to 6CHR is demodulated and the data of the bar code 1 are extracted and demodulated.
A module number judging process applied to the two time widths T01 and T02 in the character portion 1CHR will be explained with reference to FIG. 12. First, it is judged whether the time width T01 (or T02) is 0.643 or more times the time width C1 of the character portion 1CHR (step S11). C1.multidot.0.643 corresponds to the time width (counted value) of 4.5 module. In the module number judging process, when the time width T01 (or T02) is more than 4.5 module numbers, it is judged that the module number is 5 (step S12). In the similar manner, when the module number is 3.5 or more but less than 4.5, it is judged that the module number is 4 (steps S13 and S14). When the module number 2.5 or more but less than 3.5, it is judged that the module number is 3 (step S15 and S16). When the module number is 1.5 or more but less than 2.5, it is judged that the module number is 2 (step S17).
FIG. 12 shows a module number judging process procedure for the character portion 1CHR. When the other character portions 2CHR to 6CHR are subjected to a module number judging process, the time width C1 in the steps S11, S13, and S15 may be changed to the time widths C2 to C6.
In the step S2, after the data of the bar code 1 is extracted and demodulated , it is judged whether the previous demodulation data exists in the same bar code or not (step S3). If the previous data is not found, the demodulation data extracted in the step S2 is stored in the memory (step S4). When it is judged that the previous demodulation data exists in the step S2, it is read out. It is judged whether the previous data is identified with the currently extracted demodulation data or not (step S5). If no identification is found, since it is judged that the demodulation data is invalid, the next data process (step S7) is performed. On the other hand, if the previous data is identified with the current data, since the demodulation data is valid, the data reading to the bar code 1 is completed (step S6).
With reference to FIG. 10, an explanation has been made for the reading operation of the bar code 1 where six character portions 1CHR to 6CHR are arranged between the guide bar GB and the special center bar SCB. There are bar codes of various types. For example, as for the bar code 1 shown in FIG. 10, the special center bar SCB on the right side of the bar code 1 may be a center bar formed of two black bars 1B of module number 1 and two white bars 1W of module number 2, and character portions arranged on the right and left sides with respect to the center bar. Any type of bar code can be basically performed by conducting a bar code reading according to the above procedure.
In recent years, bar codes have been typically utilized in the POS systems in the distribution industry. Poor bar codes with low print quality tend to be used increasingly, thus resulting in potential for erroneous reading. Therefore it has been desired that even the bar codes in poor print quality can be read at higher accuracy and without causing an erroneous reading operation. Additionally erroneous reading of the bar code occurs because of a curvature or wrinkles of a bar code, flaws on the reading window glass of the bar code reader or other types.
In order to avoid such an erroneous reading, as described with reference to FIG. 11, demodulating at least twice and a double coincidence checking operation are performed. When the height and figure of a bar code and the scanning rate of the laser beam L2 allow only a single bar code scanning operation, the double coincidence checking method may judge that a bar code reading cannot be performed (as NO) even if the first demodulation data is reliable.